@inject BlazorCommunity.App.Service.BrowerService browerService


@if (browerService.IsMobile())
{
    <Router AppAssembly="@typeof(Program).Assembly">
        <Found Context="routeData">
            <AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MobileLayout)">
                <NotAuthorized>
                    <NotAuthorizedHandler></NotAuthorizedHandler>
                </NotAuthorized>
            </AuthorizeRouteView>
        </Found>
        <NotFound>
            <CascadingAuthenticationState>
                <LayoutView Layout="@typeof(MobileLayout)">
                    <_404></_404>
                </LayoutView>
            </CascadingAuthenticationState>
        </NotFound>
    </Router>
}
else
{
    <Router AppAssembly="@typeof(Program).Assembly">
        <Found Context="routeData">
            <AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)">
                <NotAuthorized>
                    <NotAuthorizedHandler></NotAuthorizedHandler>
                </NotAuthorized>
            </AuthorizeRouteView>
        </Found>
        <NotFound>
            <CascadingAuthenticationState>
                <LayoutView Layout="@typeof(MainLayout)">
                    <_404></_404>
                </LayoutView>
            </CascadingAuthenticationState>
        </NotFound>
    </Router>
}
